﻿<script type="text/javascript">

function candidateInfo_init(canId) {
	$.getJSON("candidateAction!getDetailedInfo.action", {canId : canId}, function(data){
		//基本信息
		$('.zwm .baseInfo #picture').attr('src', 'imgs/vote/' + data.pictureFileName);
		$('.zwm .baseInfo #username').text(data.username);
		$('.zwm .baseInfo #poll').text(data.poll);
		$('.zwm .baseInfo #job').text(data.job);
		$('.zwm .baseInfo #catName').text(data.catName);
		
		//证书图片
		var j = data.creList.length;
		for(var i = 0; i < parseInt((j + 2)/3 - 1); i++) {
			var tr = $($('.creImg tr')[0]).clone(true);
			$('.creImg table').append(tr);
		}
		
		var tdList = $('.creImg td');
		$.each(data.creList, function(index, value) {
			$(tdList[index]).html('<img src="imgs/vote/credentials/'+value.fileName+'" width="270" height="240" />');
		});
		
		//个人描述
		$('.zwm .des').html(data.describe);
		
		//材料
		if(data.infoFileName) {
			$('.zwm .info').html('<embed height="800" type=application/x-shockwave-flash width="100%" src="imgs/vote/'+data.infoFileName+'" wmode="transparent"></embed>');
		}
	});
}
</script>
<style type="text/css">
<!--
.zwm {
	margin: 5px;
	width: 860px;
}
.baseInfo {
	height: 125px;
	width: 100%;
}
.zwm hr {
	color: #C3C3C3;
	size: 1px;
}
.creImg {
	background-color: #999999;
	height: auto;
}
.des {
	height: auto;
	width: 100%;
}
.info {
}
-->
</style>

<div class="zwm">
	基本信息
	<hr>
	<div class="baseInfo">
	  <table width="100%" height="130" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="100" rowspan="2"><img id="picture" src="" width="100" height="120" /></td>
          <td height="65" align="center" valign="middle">姓名：<span id="username"></span></td>
          <td height="65" align="center" valign="middle">已获票数：<span id="poll"></span></td>
        </tr>
        <tr>
          <td height="65" align="center" valign="middle">工作：<span id="job"></span></td>
          <td height="65" align="center" valign="middle">评选种类：<span id="catName"></span></td>
        </tr>
      </table>
	</div>
	<p />
	
	证书图片
	<hr>
	<div class="creImg">
	  <table width="100%" border="0" cellspacing="5" bgcolor="#FFFFFF">
        <tr>
          <td></td>
          <td></td>
          <td></td>
        </tr>
      </table>
	</div>
	<p />
	个人描述
	<hr>
	<div class="des"></div>
	<p />
	材料
	<hr>
	<div class="info"></div>
</div>